<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
    <title>${fns:getConfig('productName')}</title>
    <%--<meta name="decorator" content="default"/>--%>
    <meta name="decorator" content="footer"/>
    <script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport"/>
</head>
<body>
<!--Header-part-->
<%--<div id="header">--%>
    <%--<h1>--%>

        <!--<a href="dashboard.html">极目云OA办公系统</a>-->
    <%--</h1>--%>
<%--</div>--%>
<div class="title_Infor">
    <a href="${ctx}/login" class="pull-left"><img src="${ctxStatic}/oaApp/img/liucheng_Icon/fanhui.png" />返回</a>
    <h3 >已办任务</h3>
</div>

<form:form id="searchForm" modelAttribute="act" action="${ctx}/act/task/historic/" method="get" class="breadcrumb form-search">
    <div>
        <label  style="font-size: 12px; width: 100%">完成时间：</label>
        <input id="beginDate"  name="beginDate"  type="text" readonly="readonly" maxlength="20" class="input-medium Wdate" style="width:36%"
               value="<fmt:formatDate value="${act.beginDate}" pattern="yyyy-MM-dd"/>"
               onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});"/>
        -
        <input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate" style="width:36%;"
               value="<fmt:formatDate value="${act.endDate}" pattern="yyyy-MM-dd"/>"
               onclick="WdatePicker({dateFmt:'yyyy-MM-dd'});"/>
        &nbsp;<input id="btnSubmit" style="width: 16%;" class="btn btn-primary" type="submit" value="查询"/>
    </div>

</form:form>

<div class="span6">
    <div class="widget-box wek_box">
        <c:forEach items="${page.list}" var="act">
            <c:set var="task" value="${act.histTask}"/>
            <c:set var="act" value="${act}"/>
            <div class="widget-content nopadding updates collapse in bor_N">
                <div class="new-update clearfix"><i><img class="img-circle img-polaroid"
                                                         src="${ctxStatic}/oaApp/img/touxiang.jpg"> </i>
                    <div class="update-done"><a title="" href="#"><strong class="fontS_16"> ${act.title}</strong></a>
                        <span></span></div>
                    <div class="update-date"><span class="update-day" style="font-size: 12px"><fmt:formatDate value="${task.endTime}" pattern="yyyy-MM-dd"/></span>已办流程</div>
                </div>
                <div class="new-update clearfix pad_T_no">
                    <a href="${ctx}/act/task/form?taskId=${task.id}&taskName=${fns:urlEncode(task.name)}&taskDefKey=${task.taskDefinitionKey}&procInsId=${task.processInstanceId}&procDefId=${task.processDefinitionId}&status=${act.status}">
                        <h4> ${act.procDef.name}</h4>
                        <span class="fontS_14"> </span>
                        <i class="icon-eye-open eys">&nbsp;&nbsp;28</i></a>
                    </a>
                </div>
            </div>
        </c:forEach>
    </div>

</div>
<img class="touchRun" style="position:absolute; bottom:0px;width: 400px;height: 200px;display: none;z-index: 999" src="${ctxStatic}/oaApp/img/loadTouch.gif"/>

<script type="text/javascript">
    function goPage(newURL) {
        if (newURL != "") {
            if (newURL == "-") {
                resetMenu();
            }
            else {
                document.location.href = newURL;
            }
        }
    }
    function resetMenu() {
        document.gomenu.selector.selectedIndex = 2;
    }

</script>

<!--发布按钮-->
<%--<script>--%>
    <%--$(function(){--%>
        <%--$(window).scroll(function(){--%>
            <%--tongyongScroll($(this));--%>
        <%--});--%>
    <%--})--%>

<%--</script>--%>
<script src="${ctxStatic}/oaApp/js/oaScroll.js"></script>
<script>
    $(function(){
        /*初始化*/
        var pageNo = 2;
        var pageSize = 1;
        var time =Math.ceil(parseInt(${listAmount})/pageSize);


        /*监听加载更多*/
        $(window).scroll(function(){
            var url='${ctx}/act/task/getActTaskMore?pageNo='+pageNo+'&pageSize='+pageSize;
            touchScroll(pageNo,pageSize,time,url,".wek_box");
            pageNo++;
        });
    });
</script>
</body>
</html>
